import request from '@/router/axios';

/**
 *@param data 新增保存接口
 * */
export const addInterface = (data) => {
  return request({
    url: '/api/manager-api/mx-interface/save',
    method: 'post',
    data
  })
}
/**
 * @param params 查询接口列表
 * */
export const getInterface = (params) => {
  return request({
    url: '/api/manager-api/mx-interface/page',
    method: 'get',
    params
  })
}

/**
 *@param data 更新单个接口信息
 * */
export const updateInterface = (data) => {
  return request({
    url: '/api/manager-api/mx-interface/update',
    method: 'post',
    data
  })
}

/**
 *@param params 获取详情
 * */
export const getDetail = (params) => {
  return request({
    url: '/api/manager-api/mx-interface/getById',
    method: 'get',
    params: params
  })
}

/**
 *@param params 获取父类型的所有功能接口
 * */
export const getFather = (params) => {
  return request({
    url: '/api/manager-api/mx-interface/getFunctionInterfacesByType',
    method: 'get',
    params: params
  })
}
